import requestApi from '../requestApi'
import sscOpenTo from 'ssccommon/utils/sscOpenTo';
export default function listButtonClick(actionId, data, index, actionFrom) {
    let listData = data;
    if(actionFrom == "detail"){
        listData = this.data.listRows[index].values;
    }
    switch(actionId){
        case 'OpenBill':
            requestApi.openBill({
                data: {
                    billtypeCode: listData.billtypecode.value, 
                    transtypeCode: listData.transtypecode.value,
                    billid: listData.busiid.value
                },
                success: (data) => {
                    sscOpenTo(this.props, data.data.system, [
                        data.data.url,
                        {
                            ...data.data.data,
                            scene: 'fycx'
                        }
                    ]);
                }
            })
        break;
    }
}